print('creating bricks')
from calculate_domain_size import number_of_bricks,bricks,fdtd_domain
import numpy as np

for ind  in np.arange(number_of_bricks):
    from get_node_indices import get_node_indices
    from initialize_fdtd_material_grid import material_3d_space
    # convert brick end coordinates to node indices 
    ni = get_node_indices(bricks[ind], fdtd_domain)
    is_ = ni["is"]
    js = ni["js"]
    ks = ni["ks"]
    ie = ni["ie"]
    je = ni["je"]
    ke = ni["ke"]
    # assign material type of the brick to the cells
    material_3d_space[is_:ie, js:je, ks:ke]  = bricks[ind]["material_type"]
